package com.example.speeddating.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.speeddating.entity.Topic;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 *
 * @author tina
 * @since 2023-06-28 11:14:34
 */
public interface TopicService extends IService<Topic> {

    public List<Topic> getHotTopics();

    public Page<Topic> getAllTopics(Page<Topic> topicPage,String searchData);

    Page<Topic> getUserJoinedTopic(Page<Topic> topicPage,Long userId);

    public void incrementJoinedNum(Integer topicId);

    public void decrementJoinedNum(Integer topicId);

    public Topic getTopicById(Integer topicId);

    public void incrementTopicTot(Integer topicId,Integer type);

    Page<Topic> selectAllTopic(Page<Topic> pageInfo);
}
